#!/usr/bin/php
<?php
/**
 * Prints the first FLV link found in the web page passed as first argument
 * e.g.
 * eflv http://www.site.com/page-with-flv-link.html
 *
 * @copyright Elvis Ciotti - phpntips.com
 */

preg_match('#http:[^\"]+\.flv#i', file_get_contents($argv[1]), $matches);
echo array_shift($matches)."\n";

